package com.myaxuan.configuration.dynamicdatasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;


/**
 * Created by pc255 on 2018/1/24.
 */

public class DynamicRoutingDataSource extends AbstractRoutingDataSource {

	@Override
	protected Object determineCurrentLookupKey() {
		System.out.println("数据源:"+ DataSourceContextHolder.getDB());
		return DataSourceContextHolder.getDB();
	}


}
